//
//  JSMDreamCityPrecialTrailsDetailModel.m
//  TakeYouTourTogether
//
//  Created by king on 15/12/3.
//  Copyright © 2015年 king. All rights reserved.
//

#import "JSMDreamCityPrecialTrailsDetailModel.h"

@implementation JSMDreamCityPrecialTrailsDetailModel

- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    if ([key isEqualToString:@"id"]) {
        self.vid = value;
    }
    if ([key isEqualToString:@"description"]) {
        self.mydescription = value;
    }
}

- (void)encodeWithCoder:(NSCoder *)aCoder {
    [aCoder encodeObject:self.vid forKey:@"vid"];
    [aCoder encodeObject:self.mydescription forKey:@"mydescription"];
    [aCoder encodeInteger:self.activity_count forKey:@"activity_count"];
    [aCoder encodeInteger:self.willing forKey:@"willing"];
    [aCoder encodeInteger:self.is_willing forKey:@"is_willing"];
    [aCoder encodeInteger:self.logs_count forKey:@"logs_count"];
    [aCoder encodeInteger:self.score_count forKey:@"score_count"];
    [aCoder encodeObject:self.cover forKey:@"cover"];
    [aCoder encodeInteger:self.is_new forKey:@"is_new"];
    [aCoder encodeObject:self.destination forKey:@"destination"];
    [aCoder encodeFloat:self.trail_score forKey:@"trail_score"];
    [aCoder encodeInteger:self.score forKey:@"score"];
    [aCoder encodeObject:self.name forKey:@"name"];
    [aCoder encodeInteger:self.is_hot forKey:@"is_hot"];
}

- (instancetype)initWithCoder:(NSCoder *)aDecoder {
    if (self) {
        self.vid = [aDecoder decodeObjectForKey:@"vid"];
        self.mydescription = [aDecoder decodeObjectForKey:@"mydescription"];
        self.activity_count = [aDecoder decodeIntegerForKey:@"activity_count"];
        self.willing = [aDecoder decodeIntegerForKey:@"willing"];
        self.is_willing = [aDecoder decodeIntegerForKey:@"is_willing"];
        self.logs_count = [aDecoder decodeIntegerForKey:@"logs_count"];
        self.score_count = [aDecoder decodeIntegerForKey:@"score_count"];
        self.cover = [aDecoder decodeObjectForKey:@"cover"];
        self.is_new = [aDecoder decodeIntegerForKey:@"is_new"];
        self.destination = [aDecoder decodeObjectForKey:@"description"];
        self.trail_score = [aDecoder decodeFloatForKey:@"trail_score"];
        self.score = [aDecoder decodeIntegerForKey:@"score"];
        self.name = [aDecoder decodeObjectForKey:@"name"];
        self.is_hot = [aDecoder decodeIntegerForKey:@"is_hot"];
    }
    return self;
}

@end
